﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Foundation.Entity;

namespace Dyao.Book.Entity
{
    [Table("BookSourceWarehouse")]
    public class BookSourceWarehouseEntity : IEntity<string>
    {
        /// <summary>
        /// ID
        /// </summary>
        [Required]
        [Column("Id", TypeName = "VARCHAR")]
        [Key]
        public string ID { get; set; }

        /// <summary>
        /// 书源名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 请求头
        /// </summary>
        public string Header { get; set; }

        /// <summary>
        /// 书源地址
        /// </summary>
        public string Url { get; set; }

        /// <summary>
        /// 搜索地址
        /// https://www.xbiqu6.com/search?searchkey={0}
        /// </summary>
        public string SearchUrl { get; set; }

        /// <summary>
        /// 启用
        /// </summary>
        public bool Enabled { get; set; }

        /// <summary>
        /// 用户编号
        /// </summary>
        [Required]
        public int CreateUserId { get; set; }

        /// <summary>
        /// 用户名称
        /// </summary>
        [Required]
        public string CreateUserName { get; set; }

        /// <summary>
        /// 爬取时间
        /// </summary>
        [Required]
        public DateTime CreateDateTime { get; set; }

        /// <summary>
        /// 用户编号
        /// </summary>
        [Required]
        public int UpdateUserId { get; set; }

        /// <summary>
        /// 用户名称
        /// </summary>
        [Required]
        public string UpdateUserName { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        [Required]
        public DateTime UpdateDateTime { get; set; }

        /// <summary>
        /// 爬虫规则
        /// </summary>
        public string SpiderRule { get; set; }

        /// <summary>
        /// 目标类型
        /// </summary>
        public string SourceKey { get; set; }

        /// <summary>
        /// 是否删除
        /// </summary>
        public bool IsDel { get; set; }
    }
}
